﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using VIP.Infrastructure;

namespace VIP.Application.Controllers
{
    [ApiController]
    [Route("BaseData/[controller]")]
    public class ApolloController : ControllerBase
    {
        private IConfiguration _configration;
        public ApolloController(IConfiguration configuration)
        {
            _configration = configuration;
        }
        [HttpGet, Route("GetPublic")]
        public string GetPublic(string key)
        {
            var v = _configration.GetValue<string>(key);
            return v;
        }

        [HttpGet]
        [Route("ApolloGet")]
        public string ApolloTest([FromServices] IConfiguration configuration, string key)
        {
            var r = configuration.GetValue<string>(key);
            return r;
        }

    }
}
